
#ifndef _TIMER_H_
#define _TIMER_H_

#include	"Global.h"

#define	T1MS	4

#define C_TB0_DIV_256   0b00000000
#define C_TB0_DIV_512   0b00000001
#define C_TB0_DIV_1024  0b00000010
#define C_TB0_DIV_2048  0b00000011
#define C_TB0_DIV_4096  0b00000100
#define C_TB0_DIV_8192  0b00000101
#define C_TB0_DIV_16384 0b00000110
#define C_TB0_DIV_32768 0b00000111

#define C_TB1_DIV_4096  0b00000000
#define C_TB1_DIV_8192  0b00010000
#define C_TB1_DIV_16384 0b00100000
#define C_TB1_DIV_32768 0b00110000

#define C_TBCK_FSUB     0b00000000
#define C_TBCK_FSYS_4   0b01000000

#define C_TBOFF         0b00000000
#define C_TBON          0b10000000

void timebase0_configure(void);
void Delay10us(u8 cnt);
void DelayXmSec(u16 xs);

#endif   /* _TIMER_H_ */